<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="java.util.*"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
//response.sendRedirect("common/login");
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>定时任务</title>
			<script type="text/javascript" src="${path }/resource/js/jquery-1.8.3.min.js"></script>
		<%-- 	<script type="text/javascript" src="${path }/resource/js/jquery-1.8.3.min.js"></script> --%>
			<script type="text/javascript" src="${path }/resource/layer/layer.js"></script>
			<script type="text/javascript" src="${path }/resource/js/mytools.js"></script>
			<script type="text/javascript" src="${path }/resource/layui/layui.js" ></script>
			<link rel="stylesheet" href="${path }/resource/layui/css/layui.css" />
	</head>
	<body>
	
	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  <legend>定时任务</legend>
</fieldset>
<form class="layui-form" action="" id="from1">
<input type="hidden" name="id" value="${obj.id}"/> <!--隐藏域id el表达式获取 -->
<div class="layui-form-item">
	<div class="layui-inline">
      <label class="layui-form-label">jobName</label>
      <div class="layui-input-inline">
      	<input type="text" name="jobName" class="layui-input" placeholder="jobName" value="${obj.jobName}" id="jobName"/>
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">gropName</label>
      <div class="layui-input-inline">
      <input type="text" name="gropName" class="layui-input" value="${obj.gropName}" id="gropName"/>
      </div>
    </div>
     <div class="layui-inline">
      <label class="layui-form-label">triggerName</label>
      <div class="layui-input-inline">
      <input type="text" name="triggerName" class="layui-input" value="${obj.triggerName}" id="gropName"/>
      </div>
    </div>
     <div class="layui-inline">
      <label class="layui-form-label">cron</label>
      <div class="layui-input-inline">
      <input type="text" name="cron" class="layui-input" value="${obj.cron}" id="gropName"/>
      </div>
    </div>
</div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <input  type="button" value="保存"  class="layui-btn"  lay-submit="" lay-filter="form1">
      <input type="reset" class="layui-btn layui-btn-primary" value="重置">
    </div>
  </div>
</form>
	<script type="text/javascript">
	layui.use(['form', 'layedit', 'laydate'], function(){
		  var form = layui.form()
		  ,layer = layui.layer
		  ,layedit = layui.layedit
		  ,laydate = layui.laydate;
		  //监听提交
		  form.on('submit(form1)', function(data){
			  mytooljs.initForm({
					idSelecter :"#from1", //表单id选择器
					sendurl:"${path }/user/crawl/TaskJob/addOrModify",//发送请求的地址
					data:data.field,//传数据过去
					afterload:function(){//请求成功后回调
						layer.open({
					       	  content: '保存成功'
					       	  ,btn: ['确定']
					       	  ,yes: function(index, layero){
					       		parent.mjs.search();
					       		parent.layer.closeAll();
					       	  }
					       	}); 
					}
				});
		    return false;
		  });
		});
		</script>
	</body>
</html>
